package com.hzncc.flowable_diboot.project_contracts.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
* 项目类合同合同项目 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-09-24
* Copyright © MyCorp
*/

@TableName("mdl_project_contract_item")
@Getter @Setter @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class ProjectContractItem extends BaseModel {
    private static final long serialVersionUID = 1807279783992760822L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 序号
     */
    @TableField()
    private Long serialNumber;

    /**
     * 物料编码
     */
    @Length(max=100, message="物料编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String materialCode;

    /**
     * 设备名称
     */
    @Length(max=100, message="设备名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String equipmentName;

    /**
     * 规格及型号
     */
    @Length(max=100, message="规格及型号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String specificationAndModel;

    /**
     * 系统配置
     */
    @Length(max=100, message="系统配置长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String systemConfiguration;

    /**
     * 制造厂商名称
     */
    @Length(max=100, message="制造厂商名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String manufacturerName;

    /**
     * 数量
     */
    @TableField()
    private BigDecimal quantity;

    /**
     * 销售单价
     */
    @TableField()
    private BigDecimal salesUnitPrice;

    /**
     * 销售总价
     */
    @TableField()
    private BigDecimal salesTotalPrice;

    /**
     * 销售询价
     */
    @TableField()
    private BigDecimal salesInquiry;

    /**
     * 询价人
     */
    @Length(max=100, message="询价人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String inquirer;

    /**
     * 询价人电话
     */
    @Length(max=100, message="询价人电话长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String inquirerPhoneNumber;

    /**
     * 询价单位
     */
    @Length(max=100, message="询价单位长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String inquiryUnit;

    /**
     * 采购单价
     */
    @TableField()
    private BigDecimal purchaseUnitPrice;

    /**
     * 采购总价
     */
    @TableField()
    private BigDecimal purchaseTotalPrice;

    /**
     * 交货日期
     */
    @TableField()
    private LocalDateTime deliveryDate;

    /**
     * 质保期
     */
    @Length(max=100, message="质保期长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String warrantyPeriod;

    /**
     * 付款方式
     */
    @TableField()
    private String paymentMethod;

    /**
     * 折扣/毛利100%
     */
    @TableField()
    private BigDecimal discount;

    /**
     * 退税
     */
    @TableField()
    private BigDecimal taxRebate;

    /**
     * 退税后毛利率
     */
    @TableField()
    private BigDecimal grossProfitRateAfterTaxRebate;

    /**
     * 备注
     */
    @Length(max=200, message="备注长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remarks;

    /**
     * 条目类型 1 项目类合同 销售费用 自制 无成本
     */
    @Length(max=100, message="条目类型长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String itemType;

    /**
     * 项目类合同id
     */
    @TableField()
    private String contractId;


}